<?php /*foreach ($menus as $menu) : ?>
	
	<?php if ($menu['parent_menu'] != 0) continue; ?>
	
	<li <?php echo $active == $menu['url'] ? 'class="active"' : '' ?>><?php echo anchor($menu['url'], $menu['name']); ?></li>
	
	<?php foreach ($menus as $menu2) : ?>
	
		<?php if ($menu2['parent_menu'] == $
	
	<?php endforeach; ?>
	
<?php endforeach; */ ?>

<?php

	foreach ($menumenu as $menu)
	{
		if ($menu['parent_menu'] != 0) continue;
		
		$class = $active == $menu['url'] ? 'active' : '';
		
		$normal_li = '<li class="' . $class . '">' . anchor($menu['url'], $menu['name']) . '</li>';
		$parent_li = '<li class="dropdown ' . $class . '" data-dropdown="dropdown"><a href="javascript:void(0)" class="dropdown-toggle">' . $menu['name'] . '</a><ul class="dropdown-menu">';
		
		$is_parent = 0;
		$is_normal = 0;
		
		foreach ($menumenu as $menu2)
		{
			if ($menu2['parent_menu'] == $menu['menu_id'])
			{
				if ($is_parent == 0) echo $parent_li;
				$is_parent++;
				
				echo $menu2['divider'] == 'y' ? '<li class="divider">' : '<li>' . anchor($menu2['url'], $menu2['name']) . '</li>';
			}
		}
		
		#if ($is_parent > 0)
		
		echo $is_parent > 0 ? '</ul></li>' : $normal_li;
	}



?>